<template>
	<div class="empty-loading-wrapper">
		<image v-if="type==='empty'" class="image" :src="PictureUrl+'image-empty.png'" mode="widthFix"></image>
		<image v-if="type==='loading'" class="image" :src="PictureUrl+'image-loading.png'" mode="widthFix"></image>
		<u-loading-icon v-if="type==='loading'" status="loading" size="40" height="100" :icon="true" textSize="30"
			:text="text" />
		<div v-if="type==='empty'">{{text}}</div>
	</div>
</template>

<script>
	import {
		mapGetters
	} from "vuex"
	export default {
		props: {
			type: { // 当前选中的tab index
				type: String,
				default: 'loading'
			},
			text: { // 当前角色
				type: String,
				default: '加载中...'
			}

		},
		computed: {
			...mapGetters(["PictureUrl"])
		},
		methods: {}
	}
</script>

<style lang="scss">
	.empty-loading-wrapper {
		display: flex;
		flex-direction: column;
		align-items: center;

		.image {
			margin-top: 100upx;
			margin-bottom: 40upx;
			width: 400upx;
		}
	}
</style>
